<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="/css/nav.css">
    <link rel="stylesheet" type="text/css" href="/font/iconfont.css">
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/layui/layui.js"></script>
    <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script>
    <script type="text/javascript" src="/js/nav.js"></script>
    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5.0.0/dist/echarts.min.js"></script>
<!--    <script src="/js/jquery.1.8.3.min.js"></script>-->
</head>
<body>
<div th:include="/common/nav :: nav" class="nav" style="float: left;"></div>
<div style="float: left;height: 100%;width: 87.5%;background-color: rgb(235, 243, 243);" >
    <div class="content">

        <div class="demoTable">
            搜索ID：
            <div class="layui-inline">
                <label><input class="layui-input" name="id" id="demoReload" autocomplete="off"  placeholder="输入id"></label>
            </div>
            <button class="layui-btn" data-type="reload">搜索</button>
        </div>
        <table class="layui-table" id="LAY_table_user" lay-filter="user">
            <th>id</th><th>地址</th><th>userId</th><th>工作区域</th><th>工号</th><th>真实名字</th><th>性别</th>
            <th>本月工作量</th><th>本月工资</th>
            <tr  >
                <td th:value="${courier.getId()}" th:text="${courier.getId()}"></td>
                <td th:value="${courier.getId()}" th:text="${courier.getAddress()}"></td>
                <td th:value="${courier.getId()}" th:text="${courier.getUser().getId()}"></td>
                <td th:value="${courier.getId()}" th:text="${courier.getWorkingArea().getAddressName()}"></td>
                <td th:value="${courier.getId()}" th:text="${courier.getNo()}"></td>
                <td th:value="${courier.getId()}" th:text="${courier.getRealName()}"></td>
                <td th:value="${courier.getId()}" th:text="${courier.getSex()}"></td>


                <td><a th:text="${taskNum}">本月工作量</a></td>
                <td><a th:text="${salary}">0</a></td>
            </tr>
        </table>

        <div id="main" style="width: 100%;height: 500px;text-align: center">
d
        </div>

        <script>
            // 基于准备好的dom，初始化echarts实例
            var myChart = echarts.init(document.getElementById('main'));

            $.get("")

            // 指定图表的配置项和数据
            var option = {
                // title:"近七天的工作量",
                color: ['#3398DB'],
                tooltip: {
                    trigger: 'axis',
                    axisPointer: {            // 坐标轴指示器，坐标轴触发有效
                        type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                    }
                },
                grid: {
                    left: '3%',
                    right: '4%',
                    bottom: '3%',
                    containLabel: true
                },
                xAxis: [
                    {
                        type: 'category',
                        data: ['12.1', '12.2', '12.3', '12.4', '12.5', '12.6', '12.7', '12.8', '12.9', 'Thu', 'Fri', 'Sat', 'Sun'],
                        axisTick: {
                            alignWithLabel: true
                        }
                    }
                ],
                yAxis: [
                    {
                        type: 'value'
                    }
                ],
                series: [
                    {
                        name: '工作量',
                        type: 'bar',
                        barWidth: '60%',
                        data: [10, 5, 5, 12, 23, 14, 15, 5, 5, 12, 23, 14, 15]
                    }
                ]
            };

            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option);

        </script>
        <button type="button" class="layui-btn layui-btn backlist">返回快递员列表</button>

<!--        <table class="layui-table" id="LAY_table_user" lay-filter="user">
            <th>id</th><th>时间</th><th>状态</th><th>任务名</th><th>快递号</th><th>快递员名</th><th>快递员号</th><th>快递员区域</th>

            <tr th:each="item: ${taskList}" >
                <td th:value="${item.getId()}" th:text="${item.getId()}"></td>
                <td th:value="${item.getId()}" th:text="${item.getCreateTime()}"></td>
                <td th:value="${item.getId()}" th:text="${item.getState()}"></td>
                <td th:value="${item.getId()}" th:text="${item.getTaskName()}"></td>
                <td th:value="${item.getId()}" th:text="${item.getaPackage().getNo()}"></td>
                <td th:value="${item.getId()}" th:text="${item.getCourier().getRealName()}"></td>
                <td th:value="${item.getId()}" th:text="${item.getCourier().getNo()}"></td>
                <td th:value="${item.getId()}" th:text="${item.getCourier().getWorkingArea().getAddressName()}"></td>



            </tr>
        </table>-->

    </div>
</div>
<script>

    $(".backlist").click(function () {
        location.href = "/admin/courierWorkNum"
    });
</script>
<script>

    // //给收件量赋值
    // $.ajax({
    //     url: '/courier/getThisMonthFetchNum',
    //     method: 'GET',
    //     async: false
    // }).success(function(data){
    //     console.log(data);
    //     $("#month_fetch_num").text(data);
    //     fetchNum=data;
    // });
    // //给派件量赋值
    // $.ajax({
    //     url: '/courier/getThisMonthDeliverNum',
    //     method: 'GET',
    //     async: false
    // }).success(function(data){
    //     console.log(data);
    //     deliverNum=data;
    //     $("#month_deliver_num").text(data);
    // });
    // //给工作量量赋值
    // $("#month_sum_num").text(fetchNum+deliverNum);
</script>
</body>
</html>
